package control.elements.helpers;

public abstract class ElementType {

	public int my_id;
	public int weakness_id;
	
	/**
	 * Empty constructor.
	 */
	public  ElementType(){}
	
	/**
	 * Determines if one element is weak to another.
	 * @param et
	 * @return
	 */
	public boolean isWeakTo(ElementType et) {
		boolean result;
		if(et.getID() == getWeaknessID()) {
			result = true;
		} else {
			result = false;
		}
		return result;
	}
	
	public boolean isSameAs(ElementType et) {
		boolean result;
		if(et.getID() == getID()) {
			result = true;
		} else {
			result = false;
		}
		return result;
	}
	
	/**
	 * 
	 * @return
	 */
	private int getWeaknessID() {
		return weakness_id;
	}

	/**
	 * 
	 * @return
	 */
	public int getID() {
		return my_id;
	}
	
	public String toString() {
		return getClass().getName().toString();
	}
	
}
